Repository navigation
Fix transaction thread arrows navigation - #63867
Conversation
acd9454 to
3267a64
Compare
|
To confirm, in relation to: #63621 and #63620 The transaction RHP navigation arrows will appear:
The transaction RHP navigation arrows will NOT appear anywhere else, especially
|
|
@allroundexperts Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
That makes sense to me, curious what Tom thinks though. |
|
Yep, makes sense! The arrow controls are for cycling through expenses within a report container. |
d3c6286 to
7d782ab
Compare
|
Also @mountiny one point to note - I merely extracted the function/util - I did not write it originally, it was already in this file used inside a callback. Because of that my test descriptions might be a bit clunky - because I don't know why in these specific cases we prefer |
|
I know but I think we need to get into a habit of leaving the code better than we found it so adding tests like this when appropriate. I will check the decription |
|
Yeah I have no problem with that, I just wanted to specifically point out that my understanding of the domain logic for this function may be flawed ;) please check if the test cases make sense. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppUnable to build android Android: mWeb ChromeScreen.Recording.2025-06-17.at.10.03.43.PM.moviOS: HybridAppScreen.Recording.2025-06-17.at.10.00.04.PM.moviOS: mWeb SafariScreen.Recording.2025-06-17.at.9.55.52.PM.movMacOS: Chrome / SafariScreen.Recording.2025-06-17.at.9.34.13.PM.movMacOS: DesktopScreen.Recording.2025-06-17.at.9.52.24.PM.mov |
|
@Kicu First test is failing for me. Screen.Recording.2025-06-11.at.11.22.34.PM.mov |
|
@allroundexperts I cannot reproduce this error that you are showing :/ This is the most basic case and I tested it multiple times. Here's newest video on current code. rec-arrows.mp4Can you tell me:
// edit: different report, on Inbox rec-arrows2.mp4 |
Start saving the current transaction thread ids in onyx, so the component becomes more reliable.
4e8ac8a to
b2bb073
Compare
|
@allroundexperts let's please push this forward. Can you re-test? The deleting an item and using the arrows case is really the most basic that I tested multiple times and not noticed any problems. |
|
Pushed 1 fresh commit, that could potentially make this more reliable - I added waiting on onyx set before navigating to transaction thread RHP. |
|
Thanks for the updates @Kicu. I'll review this again today and get back. |
|
@Kicu Can you please resolve conflicts? |
|
@Kicu This is still happening. From what I can observe, it seems like if you delete and quickly open the RHP and click the Screen.Recording.2025-06-16.at.6.57.48.PM.mov |
|
Try on a slow network maybe. |
|
@allroundexperts ok thanks for checking this. I actually found the core of this bug now - there is a short time when transaction is pending delete but is not yet removed from the list of transactions, until the delete action returns from backend. So user sees 2 transactions but in state there are 3 transactions. With the newest commit I'm actually filtering soft-deleted actions from the rec-test.mp4Please retest 🙏 |
c01d76a to
a31b730
Compare
|
I tested it and it is working well now. Also, added all the screen recordings but it seems like there are conflicts again. Can we resolve them? |
|
thanks, conflicts solved |
|
Did a quick retest of deleting and clicking and verified that arrows work correctly |
mountiny
left a comment
There was a problem hiding this comment.
Looks good, mainly a question about performance for a large report but I think that is NAB
| Navigation.navigate(ROUTES.SEARCH_REPORT.getRoute({reportID, backTo})); | ||
| // When opening the transaction thread in RHP we need to find every other ID for the rest of transactions | ||
| // to display prev/next arrows in RHP for navigation | ||
| setActiveTransactionThreadIDs(siblingTransactionThreadIDs).then(() => { |
There was a problem hiding this comment.
I wonder, could you test with a report that will have 300 expenses for example. How long will this processing take before we navigate to the RHP? @Kicu @allroundexperts
There was a problem hiding this comment.
Sure I can test. However I remember in the past asking about such cases in the context of other tasks, and the answer was that they won't happen.
Honestly I have no idea how the table view would behave if it got 300 transactions
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.69-0 🚀
|
1 similar comment
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.69-0 🚀
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.69-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.1.69-3 🚀
|
|
@mountiny with ~300 transactions this code still behaves well if a bit slower. Although everything became a bit slower, because I would guess we never tested the whole Report Table View on such a big number of transactions (also it wouldn't work well because of the pagination report actions problem I think). But there is no terrible slowdown, see video rec-300-transactions.mp4 |

This PR refactors how navigating between transaction thread in RHP works, to make it more stable and fix bugs.

Explanation of Change
useEffectwhich is no longer necessaryPS. I have a hard time building android locally :/ will update the videos later once I fix it.
Fixed Issues
$ #63621
$ #63620
PROPOSAL:
Tests
Offline tests
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
trans-arrows-ios.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
trans-arrows-delete-web.mp4
MacOS: Desktop